package com.lagou.demo.controller;

import com.lagou.demo.service.IDemoService;
import com.lagou.edu.mvcframework.annotations.LagouAutowired;
import com.lagou.edu.mvcframework.annotations.LagouController;
import com.lagou.edu.mvcframework.annotations.LagouRequestMapping;
import com.lagou.edu.mvcframework.annotations.Security;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@LagouController
@LagouRequestMapping("/demo")
@Security({"zhangsan", "wangwu"})
public class DemoController {

    @LagouAutowired
    private IDemoService demoService;

    @LagouRequestMapping("/handle01")
    @Security({"lisi"})
    public String query(String name, HttpServletRequest request, HttpServletResponse response){
         return demoService.getName(name);
    }

}
